\hypertarget{classcalico_1_1sensors_1_1OpenCv5Model}{}\doxysection{calico\+::sensors\+::Open\+Cv5\+Model Class Reference}
\label{classcalico_1_1sensors_1_1OpenCv5Model}\index{calico::sensors::OpenCv5Model@{calico::sensors::OpenCv5Model}}


{\ttfamily \#include $<$camera\+\_\+models.\+h$>$}



Inheritance diagram for calico\+::sensors\+::Open\+Cv5\+Model\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=226pt]{classcalico_1_1sensors_1_1OpenCv5Model__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for calico\+::sensors\+::Open\+Cv5\+Model\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=226pt]{classcalico_1_1sensors_1_1OpenCv5Model__coll__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classcalico_1_1sensors_1_1OpenCv5Model_a6918477cbbbfbaefa37433e2df393a7f}\label{classcalico_1_1sensors_1_1OpenCv5Model_a6918477cbbbfbaefa37433e2df393a7f}} 
\mbox{\hyperlink{classcalico_1_1sensors_1_1OpenCv5Model}{Open\+Cv5\+Model}} \& {\bfseries operator=} (const \mbox{\hyperlink{classcalico_1_1sensors_1_1OpenCv5Model}{Open\+Cv5\+Model}} \&)=default
\item 
\mbox{\Hypertarget{classcalico_1_1sensors_1_1OpenCv5Model_ac7d24a188775387ddab2468106e8fac3}\label{classcalico_1_1sensors_1_1OpenCv5Model_ac7d24a188775387ddab2468106e8fac3}} 
\mbox{\hyperlink{namespacecalico_1_1sensors_a1eaf57959273c4ea8dc8899a2e724a2f}{Camera\+Intrinsics\+Model}} \mbox{\hyperlink{classcalico_1_1sensors_1_1OpenCv5Model_ac7d24a188775387ddab2468106e8fac3}{Get\+Type}} () const final
\begin{DoxyCompactList}\small\item\em Getter for camera model type. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classcalico_1_1sensors_1_1OpenCv5Model_afbdff9e7e22e38ead790b54a70eda378}\label{classcalico_1_1sensors_1_1OpenCv5Model_afbdff9e7e22e38ead790b54a70eda378}} 
int \mbox{\hyperlink{classcalico_1_1sensors_1_1OpenCv5Model_afbdff9e7e22e38ead790b54a70eda378}{Number\+Of\+Parameters}} () const final
\begin{DoxyCompactList}\small\item\em Getter for the number of parameters for this camera model. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename T $>$ }\\static absl\+::\+Status\+Or$<$ Eigen\+::\+Vector2$<$ T $>$ $>$ \mbox{\hyperlink{classcalico_1_1sensors_1_1OpenCv5Model_a4aa78688f3baf12b5d6fef0216452f4a}{Project\+Point}} (const Eigen\+::\+VectorX$<$ T $>$ \&intrinsics, const Eigen\+::\+Vector3$<$ T $>$ \&point)
\item 
{\footnotesize template$<$typename T $>$ }\\static absl\+::\+Status\+Or$<$ Eigen\+::\+Vector3$<$ T $>$ $>$ \mbox{\hyperlink{classcalico_1_1sensors_1_1OpenCv5Model_a217beae32c405b834d83d05a6e13dfb1}{Unproject\+Pixel}} (const Eigen\+::\+VectorX$<$ T $>$ \&intrinsics, const Eigen\+::\+Vector2$<$ T $>$ \&pixel, int max\+\_\+iterations=30)
\end{DoxyCompactItemize}
\doxysubsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classcalico_1_1sensors_1_1OpenCv5Model_ad527b5028cedfc811fb90115f9586dcc}\label{classcalico_1_1sensors_1_1OpenCv5Model_ad527b5028cedfc811fb90115f9586dcc}} 
static constexpr int {\bfseries k\+Number\+Of\+Parameters} = 8
\item 
\mbox{\Hypertarget{classcalico_1_1sensors_1_1OpenCv5Model_a6bbe930fe7004401ca55776e1776c991}\label{classcalico_1_1sensors_1_1OpenCv5Model_a6bbe930fe7004401ca55776e1776c991}} 
static constexpr \mbox{\hyperlink{namespacecalico_1_1sensors_a1eaf57959273c4ea8dc8899a2e724a2f}{Camera\+Intrinsics\+Model}} {\bfseries k\+Model\+Type} = \mbox{\hyperlink{namespacecalico_1_1sensors_a1eaf57959273c4ea8dc8899a2e724a2fa5c5d81ff8c055e0af2d4080ca90f3b6d}{Camera\+Intrinsics\+Model\+::k\+Open\+Cv5}}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
5-\/parameter Brown-\/\+Conrady projection model as presented in Open\+CV. This model assumes an isotropic pinhole model, i.\+e. $fx == fy = f$.~\newline
Parameters are in the following order\+: $[f, c_x, c_y, k_1, k_2, p_1, p_2, k_3]$~\newline
~\newline
See the \href{https://docs.opencv.org/4.x/d9/d0c/group__calib3d.html}{\texttt{ Open\+CV documentations page}} for more details. 

\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classcalico_1_1sensors_1_1OpenCv5Model_a4aa78688f3baf12b5d6fef0216452f4a}\label{classcalico_1_1sensors_1_1OpenCv5Model_a4aa78688f3baf12b5d6fef0216452f4a}} 
\index{calico::sensors::OpenCv5Model@{calico::sensors::OpenCv5Model}!ProjectPoint@{ProjectPoint}}
\index{ProjectPoint@{ProjectPoint}!calico::sensors::OpenCv5Model@{calico::sensors::OpenCv5Model}}
\doxysubsubsection{\texorpdfstring{ProjectPoint()}{ProjectPoint()}}
{\footnotesize\ttfamily template$<$typename T $>$ \\
static absl\+::\+Status\+Or$<$Eigen\+::\+Vector2$<$T$>$ $>$ calico\+::sensors\+::\+Open\+Cv5\+Model\+::\+Project\+Point (\begin{DoxyParamCaption}\item[{const Eigen\+::\+VectorX$<$ T $>$ \&}]{intrinsics,  }\item[{const Eigen\+::\+Vector3$<$ T $>$ \&}]{point }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}

Returns projection $\mathbf{p}$, a 2-\/D pixel coordinate such that \[ \mathbf{p} = \left[\begin{matrix}f&0\\0&f\end{matrix}\right]\mathbf{p}_d + \left[\begin{matrix}c_x\\c_y\end{matrix}\right]\\ \mathbf{p}_d = s\mathbf{p}_m + \left(2\mathbf{p}_m{\mathbf{p}_m}^T + r^2\mathbf{I}\right) \left[\begin{matrix}p_2\\p_1\end{matrix}\right]\\ s = 1 + k_1r^2 + k_2r^4 + k_3r^6\\ r^2 = {\mathbf{p}_m}^T\mathbf{p}_m\\ \mathbf{p}_m = \left[\begin{matrix}t_x / t_z\\t_y/t_z\end{matrix}\right]\\ \] {\ttfamily intrinsics} is a vector of intrinsics parameters the following order\+: $[f, c_x, c_y, k_1, k_2, p_1, p_2, k_3]$~\newline
~\newline
{\ttfamily point} is the location of the feature resolved in the camera frame $\mathbf{t}^s_{sx} = \left[\begin{matrix}t_x&t_y&t_z\end{matrix}\right]^T$. \mbox{\Hypertarget{classcalico_1_1sensors_1_1OpenCv5Model_a217beae32c405b834d83d05a6e13dfb1}\label{classcalico_1_1sensors_1_1OpenCv5Model_a217beae32c405b834d83d05a6e13dfb1}} 
\index{calico::sensors::OpenCv5Model@{calico::sensors::OpenCv5Model}!UnprojectPixel@{UnprojectPixel}}
\index{UnprojectPixel@{UnprojectPixel}!calico::sensors::OpenCv5Model@{calico::sensors::OpenCv5Model}}
\doxysubsubsection{\texorpdfstring{UnprojectPixel()}{UnprojectPixel()}}
{\footnotesize\ttfamily template$<$typename T $>$ \\
static absl\+::\+Status\+Or$<$Eigen\+::\+Vector3$<$T$>$ $>$ calico\+::sensors\+::\+Open\+Cv5\+Model\+::\+Unproject\+Pixel (\begin{DoxyParamCaption}\item[{const Eigen\+::\+VectorX$<$ T $>$ \&}]{intrinsics,  }\item[{const Eigen\+::\+Vector2$<$ T $>$ \&}]{pixel,  }\item[{int}]{max\+\_\+iterations = {\ttfamily 30} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}

Inverts the projection model $\mathbf{P}$ to obtain the bearing vector $\mathbf{p}_m$ of the pixel location $\mathbf{p}$. No closed form solution is available, so we use Newton\textquotesingle{}s method to invert the projection model.~\newline
~\newline
{\ttfamily intrinsics} is a vector of intrinsics parameters the following order\+: $[f, c_x, c_y, k_1, k_2, p_1, p_2, k_3]$~\newline
~\newline
{\ttfamily max\+\_\+iterations} specifies the maximum number of Newton steps to take. Optimization will stop automatically if the error is less than 1e-\/14.~\newline
~\newline
{\bfseries{Note\+: This implementation produces superior results for high distortions compared to \href{https://docs.opencv.org/3.4/da/d54/group__imgproc__transform.html\#ga55c716492470bfe86b0ee9bf3a1f0f7e}{\texttt{ Open\+CV\textquotesingle{}s implementation}}. If your application requires numerical precision, it is recommend that you use this one.}} 

The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
calico/sensors/camera\+\_\+models.\+h\end{DoxyCompactItemize}
